package com.wsl.HealthChallenge.models;

import java.util.HashSet;
import java.util.Set;

import javax.jdo.annotations.PersistenceCapable;
import javax.jdo.annotations.Persistent;
import javax.jdo.annotations.PrimaryKey;

@PersistenceCapable
public class UserEntry {
    @PrimaryKey
    @Persistent
    private String userId;

    @Persistent
    private String name;

    @Persistent
    private String email;

    @Persistent
    private String googleHealthSessionToken;

    @Persistent
    private HashSet<String> participatingContests;

    @Persistent
    private HashSet<String> adminContests;

    public UserEntry(String userId, String name, String email, String googleHealthSessionToken) {
        this.userId = userId;
        this.name = name;
        this.email = email;
        this.googleHealthSessionToken = googleHealthSessionToken;
        participatingContests = new HashSet<String>();
        adminContests = new HashSet<String>();
    }

    public String getUserId() {
        return userId;
    }

    public String getName() {
        return name;
    }

    public String getEmail() {
        return email;
    }

    public String getGoogleHealthSessionToken() {
        return googleHealthSessionToken;
    }

    public void setGoogleHealthSessionToken(String googleHealthSessionToken) {
        this.googleHealthSessionToken = googleHealthSessionToken;
    }

    public Set<String> getParticipatingContests() {
        return participatingContests;
    }

    public Set<String> getAdminContests() {
        return adminContests;
    }
}